﻿@helper Display(System.Security.Principal.IPrincipal principal, string value, bool onlyAdmin = false){
    if (principal.Identity.IsAuthenticated)
    {
        if (onlyAdmin){
            if (principal.IsInRole(Springwater.Business.Enums.UserEnum.Admin))
            {
                @value
            }
            else
            {
                <span title="Only Admin">###</span>
            }
        }
        else
        {
            @value
        }
    }
    else
    {
        <span title="You need to authenticate">###</span>
    }
}
